Implementing graph grammars for intelligence analysis in OCaml
نویسندگان
چکیده
We report on implementing graph grammars for intelligence analysis in OCaml. Graph grammars are represented as elements of an algebraic data type in OCaml. In addition to algebraic data types, we use other concepts from functional programming languages to implement features of graph grammars. We use type checking to perform graph pattern matching. Graph transformations are defined as implicit coercions derived from structural subtyping proofs, subset types, lambda abstractions, and analytics. An analytic is a general-purpose OCaml function whose output is required to match a graph pattern described by an element of an algebraic data type. By using a strongly-typed language for representing graphs, we can ensure graphs produced from a graph transformation will match a specific schema. This is a high priority requirement for intelligence analysis.
منابع مشابه
Faster, Practical GLL Parsing
Generalized LL (GLL) parsing is an extension of recursivedescent (RD) parsing that supports all context-free grammars in cubic time and space. GLL parsers have the direct relationship with the grammar that RD parsers have, and therefore, compared to GLR, are easier to understand, debug, and extend. This makes GLL parsing attractive for parsing programming languages. In this paper we propose a m...
متن کاملUniform Random Generation of Graphs with Graph Grammars
The aim of the project is to develop a graph generator that provides users with a powerful method to specify graph classes from which the generated graphs are drawn. This is achieved by adapting a method for string generation over context-free grammars to hyperedge replacement grammars, and implementing this method in Scala.
متن کاملSupporting Visual Editors using Reference Attributed Grammars
Reference attributed grammars (RAGs) extend Knuth’s attribute grammars with references. These references can be used to extend the abstract syntax tree to a graph. We investigate how RAGs can be used for implementing tools for visual languages. Programs in those languages can often be expressed as graphs.
متن کاملMdl-based context-free graph grammar induction and applications
We present an algorithm for the inference of context-free graph grammars from examples. The algorithm builds on an earlier system for frequent substructure discovery, and is biased toward grammars that minimize description length. Grammar features include recursion, variables and relationships. We present an illustrative example, demonstrate the algorithm’s ability to learn in the presence of n...
متن کاملProgram Graph Transformation
Graph transformation, a branch of theoretical computer science, is about the definition of graph languages by grammars, and the study of computations on graphs by rewrite rules. In this paper, we sketch a software engineering problem – the refactoring of object-oriented software – and indicate how graph grammars and graph rewrite rules can be extended for specifying and implementing refactoring...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
- CoRR
دوره abs/1606.01081 شماره
صفحات -
تاریخ انتشار 2016